package com.naiterui.ehp.bs.recommend.bean;

// default package

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * DocMedicationRecomDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "dr_medication_require_detail")
public class MedicationRequireDetail implements java.io.Serializable {

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = -2261580412105878095L;
    // Fields

    private Long id;
    private Long requireId;
    private Long pid;
    private Long skuId;
    private String name;
    private String commonName;
    private String spec;//药品规格
    private Integer quantity;
    private String quantityUnit;
    private Date createdAt;
    private Date changedAt;

    /**
     * 创建MedicationRecomDetail实例
     * @throws 异常信息
     */
    public MedicationRequireDetail() {
        super();
    }

    /**
     * 创建MedicationRecomDetail实例
     * @param requireId
     * @param pid
     * @param name
     * @param commonName
     * @param quantity
     * @param createdAt
     * @param changedAt
     * @throws 异常信息
     */
    public MedicationRequireDetail(Long requireId, Long pid, Long skuId, String name,
            String commonName, Integer quantity, String extId) {
        super();
        this.requireId = requireId;
        this.pid = pid;
        this.skuId = skuId;
        this.name = name;
        this.commonName = commonName;
        this.quantity = quantity;
        createdAt = new Date();
        changedAt = new Date();
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return Long 取得域 requireId 的方法。
     */
    @Column(name = "require_id")
    public Long getRequireId() {
        return requireId;
    }

    /**
     * @param requireId 对域 requireId 的设置方法.
     */
    public void setRequireId(Long requireId) {
        this.requireId = requireId;
    }

    @Column(name = "pid")
    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    @Column(name = "sku_id")
    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "common_name")
    public String getCommonName() {
        return commonName;
    }

    public void setCommonName(String commonName) {
        this.commonName = commonName;
    }

    @Column(name = "quantity")
    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    @Column(name = "created_at")
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "changed_at", length = 19)
    public Date getChangedAt() {
        return changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }
    
    @Column(name = "spec")
	public String getSpec() {
		return spec;
	}
	
	public void setSpec(String spec) {
		this.spec = spec;
	}

    @Column(name = "quantity_unit")
    public String getQuantityUnit() {
        return quantityUnit;
    }

    public void setQuantityUnit(String quantityUnit) {
        this.quantityUnit = quantityUnit;
    }
}